package ch.headshot.photomap.client.album;

import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.PopupPanel;

public class AlbumPopup extends PopupPanel {

	public static AlbumPopup instance = new AlbumPopup();

	public static void open(String url) {
		instance.setUrl(url);
		instance.center();
		instance.show();
	}

	private HTML content;

	public AlbumPopup() {
		super(true, true);
		setTitle("Album");
		add(getContent());
	}

	private HTML getContent() {
		if (content == null) {
			content = new HTML();
		}
		return content;
	}

	private void setUrl(String url) {
		getContent().setHTML("<iframe width=\"810\" height=\"630\" src=\"" + url + "\" frameborder=\"0\"></iframe>");
	}
}
